<?php

class Application_Model_Order extends Zend_Db_Table_Abstract
{
    protected $_name = 'order';
    
    public function Search_Order($keyword, $state){
        try{
            $select = $this->select();
            if($keyword != ""){
                $select->where("order_guessname_delivery like '%$keyword%'");
            }
            if($state != ""){
                $select->where("order_state = $state");
            }
            return $select;
        }
        catch (Zend_Exception $ex){
            echo $ex;
        }
    }

}

